/*
 * Semaphore.h
 *
 *  Created on: 2010-8-12
 *      Author: stargui
 */

#ifndef SEMAPHORE_H_
#define SEMAPHORE_H_

#ifndef PLATFORM_WIN32
#include <semaphore.h>
#endif

namespace Common
{

class CSemaphore
{
public:
	CSemaphore(const char *name);
	virtual ~CSemaphore();
public:
	void Wait();
	void Post();
private:
#ifndef PLATFORM_WIN32
	sem_t *m_sem;
#endif
};

}

#endif /* SEMAPHORE_H_ */
